<!-- 订单管理-回款管理-基础设置 -->
<template>
  <div class="base-setting">
    <pageHeader
      :title="title"
      :breadCrumb="breadCrumb"
      :isShowBtn="false"
    ></pageHeader>
    <div class="base-setting-warp">
      <div v-for="(item, index) in setting" :key="index">
        <settingWrap
          @goDetail="goDetail(item)"
          :name="item.name"
          :description="item.description"
          :icon="item.icon"
        ></settingWrap>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
  import { reactive, ref } from 'vue';
  import pageHeader from '@/components/page-header/index.vue';
  import settingWrap from '@/components/setting-wrap/index.vue';
  import { useRouter } from 'vue-router';
  import { settingWarp } from '@/types/global';

  const router = useRouter();
  const title: string = '基础设置';

  const breadCrumb: string[] = ['订单管理', '回款管理', '基础设置'];

  const setting = reactive<Array<settingWarp>>([
    {
      name: '回款编号设置',
      description: '-主要用于配置回款记录编号',
      icon: 'icon-settings',
      path: 'NumberReturnMoney',
    },
    {
      name: '发票编号设置',
      description: '-主要用于配置回款记录编号',
      icon: 'icon-settings',
      path: 'InvoiceApplyNumber',
    },
    {
      name: '回款类型设置',
      description: '-主要用于配置合同回款的类型',
      icon: 'icon-settings',
      path: 'ReturnedTypeContract',
    },
    // {
    //   name: '发票申请编号设置',
    //   description: '-主要用于发票申请开具时的识别号',
    //   icon: 'icon-settings',
    //   path: 'InvoiceApplyNumber',
    // },
    {
      name: '账户设置',
      description: '-主要配置客户的来源、类别、等级',
      icon: 'icon-settings',
      path: 'AccountSetting',
    },
    {
      name: '发票类型设置',
      description: '-主要配置发票类型与税率',
      icon: 'icon-settings',
      path: 'InvoiceType',
    },
  ]);

  const goDetail = (item: any) => {
    router.push({
      name: item.path,
    });
  };
</script>

<style scoped lang="less">
  .base-setting {
    &-warp {
      display: flex;
      flex: 1;
      flex-wrap: wrap;
    }
  }
</style>
